c315b9aba1fe1462cfb04a4f42469af1aaeb5d62,library/src/main/java/io/nlopez/smartlocation/location/LocationStore.java,LocationStore,get,#String#,41

Before Change


    public Location get(String id) {
        if (preferences != null && preferences.contains(getFieldKey(id, LATITUDE_ID)) && preferences.contains(getFieldKey(id, LONGITUDE_ID))) {
            Location location = new Location(PROVIDER);
            location.setLatitude(preferences.getFloat(getFieldKey(id, LATITUDE_ID), 0));
            location.setLongitude(preferences.getFloat(getFieldKey(id, LONGITUDE_ID), 0));
            location.setAccuracy(preferences.getFloat(getFieldKey(id, ACCURACY_ID), 0));
            location.setSpeed(preferences.getFloat(getFieldKey(id, SPEED_ID), 0));

After Change


        if (preferences != null && preferences.contains(getFieldKey(id, LATITUDE_ID)) && preferences.contains(
                getFieldKey(id, LONGITUDE_ID))) {
            Location location = new Location(preferences.getString(PROVIDER_ID, PROVIDER));
            location.setLatitude(Double.longBitsToDouble(preferences.getLong(getFieldKey(id, LATITUDE_ID), 0)));
            location.setLongitude(Double.longBitsToDouble(preferences.getLong(getFieldKey(id, LONGITUDE_ID), 0)));
            location.setAccuracy(preferences.getFloat(getFieldKey(id, ACCURACY_ID), 0));
            location.setAltitude(Double.longBitsToDouble(preferences.getLong(getFieldKey(id, ALTITUDE_ID), 0)));